<script type="text/javascript">
<!--
{literal}
    $(document).ready(function(){
        $('#radAdminButtonDiv #addNewBtn').click(function(){
            addNewRadService();
        });
        $('#editRadServiceFrm tbody tr:last').addClass('last');
    });
{/literal}
//-->
</script>
<div style="width: 720px;" class="form_container" id="radAdminEditDiv">
    <form name="editRadServiceFrm" id="editRadServiceFrm">
    <input type="hidden" name="serviceId" id="serviceId">
    <table cellpadding="5" cellspacing="0" style="width: 660px;">
        <tbody>
            <tr>
                <td colspan="5">
                   <span class="field" style="text-transform: uppercase" id="actionTitle">{translate}Add service{/translate}</span>
                   &nbsp;&nbsp;
                   <span id="addRadServiceMsg" class="formAlertMsg"></span>
                </td>
            </tr>
            <tr>
                <td class="label" style="width: 100px;">{translate}Service name{/translate}</td>
                <td colspan="3"><input type="text" name="serviceName" id="serviceName" style="width: 320px;"> </td>
                <td rowspan="2" valign="bottom" align="center">
                    <div id="actionBtnDiv"> 
	                    <a href="javascript:saveRadServiceInfo();" title="{translate}Save{/translate}">
	                        <img src="{$base_uri}images/add.png">
	                    </a>
                    </div>
                    {include file="/rad_admin/element_loader.html"}
                </td>                    
            </tr>
            <tr>
                <td class="label">{translate}Service price{/translate}</td>
                <td style="width: 150px;"><input type="text" style="width: 130px;" name="price" id="price"></td>
                <td class="label" style="width: 50px;">{translate}Lock{/translate}</td>
                <td>
                    <input type="radio" name="disabled" value="1"><span class="field">{translate}Yes{/translate}</span>&nbsp;
                    <input type="radio" name="disabled" value="0" checked="checked"><span class="field">{translate}No{/translate}</span>
                </td>
            </tr>
        </tbody>
    </table>
    </form>
</div>
<div id="radAdminButtonDiv">
    <button id="addNewBtn">{translate}Reset{/translate}</button>
</div>

<div class="separator" style="height: 10px;"></div>

<div style="width: 742px;">
    <table id="radServiceListTbl" class="grid" cellpadding="0" cellspacing="0" style="width: 100%;">
        <caption style="text-transform: uppercase;">{translate}Radiology service list{/translate}</caption>
        <thead>
            <tr>
                <th class="first">{translate}Order number{/translate}</th>
                <th>{translate}Service{/translate}</th>
                <th>{translate}Service price{/translate}</th>
                <th>{translate}Status_1{/translate}</th>
            </tr>
        </thead>
        <tbody>
            {if !empty($serviceList)}
                {foreach from=$serviceList item=service}
                    <tr id="row_{$service.service_id}">
                        <td>{$index++}</td>
                        <td><a href="javascript:editRadService({$service.service_id})" id="serviceName_{$service.service_id}">{$service.name}</a></td>
                        <td><span id="price_{$service.service_id}">{$service.price}</span></td>
                        <td>
                            <input type="hidden" id="disabled_{$service.service_id}" value="{$service.disabled}">
                            <span id="disabledText_{$service.service_id}">{$service.disabled_text}</span>
                        </td>    
                    </tr>
                {/foreach} 
            {else}
                <tr><td colspan="4" id="no_result">{translate}There is no radiology services{/translate}</td></tr>
            {/if}
        </tbody>
    </table>
</div>